package org.ben.birthday.twentybirthday.utils;

import java.util.regex.Pattern;

/**
 * @Author: Ben
 * @Date: 2019/7/25 8:48
 */
public class Regular {

    /**
     * 正则邮箱匹配
     * @param email
     * @return boolean
     */
    public boolean matchingEmail(String email) {
        String pattern = "^([a-zA-Z]|[0-9])(\\w|\\-)+@[a-zA-Z0-9]+\\.([a-zA-Z]{2,4})$";
        return Pattern.matches(pattern, email);
    }
}
